<template>
    <div class="item">
        <!--S收入金额-->
        <p class="money">￥{{data.money}}元</p>
        <!--E收入金额-->

        <!--S来源和时间-->
        <p class="source-time">
            <span>
                <template v-if="data.pid === '0'">红包</template>
                <template v-else>助力奖励</template>
            </span>
            <span>{{data.time}}</span>
        </p>
        <!--E来源和时间-->
    </div>
</template>

<script>
export default {
    name: "Item",
    props: {
        data: {
            type: Object
        }
    }
}
</script>

<style scoped lang="less">
    @import "@/theme.less";
    .item{
        width: 375px;
        height: 50px;
        background: #fff;
        padding:0 10px;
        box-sizing: border-box;
        margin-bottom: 1px;
        p{
            height: 25px;
            line-height: 25px;
            &.money{
                color: @font-color1;
            }
            &.source-time{
                color: @font-color2;
                span:nth-of-type(2){
                    float: right;
                }
            }
        }
    }
</style>
